﻿@model Wicresoft.UnifyShow.Portal.ViewModels.DeviceAndTypes
@{
    ViewBag.Title = "Edit";
}
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm("", "", FormMethod.Post, new Dictionary<string, object>() { { "id", "deviceEditForm" } }))
{
    @Html.HiddenFor(model => model.Device.ID)
    <table>
        <tbody>
            <tr>
                <td width="120">
                    设备的特性值：
                </td>
                <td width="200">
                    <input type="text"  readonly="readonly"  name="Identify" value="@Model.Device.Identify"/>
                </td>
            </tr>
            <tr>
                <td width="120">
                    分类：
                </td>
                <td width="200">
                    <select name="Device.Type" id="Device_Type">
                        @foreach (string item in Model.Types)
                        {
                            if (item == Model.Device.Type)
                            {
                            <option value="@item" selected="selected">@item</option>
                            }
                            else
                            {
                            <option value="@item">@item</option>
                            }
                        }
                    </select>
                </td>
            </tr>
            <tr>
                <td width="120">
                    项目：
                </td>
                <td width="200">
                    @Html.EditorFor(model => model.Device.Object)
                </td>
            </tr>
            <tr>
                <td width="120">
                    子项目：
                </td>
                <td width="200">
                    @Html.EditorFor(model => model.Device.SubObject)
                </td>
            </tr>
        </tbody>
    </table>
}